-
-
Notifications
You must be signed in to change notification settings - Fork 633
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add application message priority default #578
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution, I've added remarks in subcomments.
I updated the logic to only use the default priority for a truly omitted priority. This will allow a client to send a message with any priority (including 0 this time). I did this by making the ExternalMessage.Priority field a pointer which would then be nil if the priority wasn't included in the request. Thoughts? |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #578 +/- ##
==========================================
+ Coverage 86.09% 86.16% +0.06%
==========================================
Files 45 45
Lines 1582 1590 +8
==========================================
+ Hits 1362 1370 +8
Misses 138 138
Partials 82 82
☔ View full report in Codecov by Sentry. |
…ation update priority test
@jmattheis thanks for your help on this one. The number field is much better the way you implemented it. I rebased the branch to be in sync with master now and added a test to bump the coverage back up. Hoping all checks will pass on this next run. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks
I think the gotify client needs a change for this as well. During Otherwise, I like the idea of having a priority on application level. |
This PR adds the feature discussed in #312.
It allows a user to set a message priority default at the application level. If a sender includes a priority in the request payload to create a message, then the default will be ignored. If the sender omits the priority, then the default priority is applied to the message.
Any feedback is appreciated!